package se.perhamrin.judo.domain;

/**
 * Represents a training session at UJK
 */
public class UjkSession {
	private long id;
	private String description;
	private Day day;
	private Time start;
	private Time end;

	public UjkSession(long id, String description, Day day, Time start, Time end) {
		this.id = id;
		this.day = day;
		this.start = start;
		this.end = end;
		this.setDescription(description);
	}

	public long getId() {
		return id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ id >>> 32);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		UjkSession other = (UjkSession) obj;
		if (id != other.id) {
			return false;
		}
		return true;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setDay(Day day) {
		this.day = day;
	}

	public void setStart(Time start) {
		this.start = start;

	}

	public void setEnd(Time end) {
		this.end = end;
	}

	public Day getDay() {
		return day;
	}

	public Time getStart() {
		return start;
	}

	public Time getEnd() {
		return end;
	}

}